import { Request } from "@/utils/axios";

// 上传文件
export const uploadFileUrl = "/api/teaching-file/file/upload";
export const uploadFile = async (data) => {
    return Request.post("/teaching-file/file/upload", data, {
        headers: {
            "Content-Type": "multipart/form-data",
            autoTip: "error",
        },
    });
};

// 下载文件
export const downloadFileUrl = "/api/teaching-file/file/download";
export const downloadFile = async (params) => {
    return Request.post("/teaching-file/file/download", params, {
        headers: {
            autoTip: "error",
        },
    });
};